3.4.26 \(\int \tan ^3(c+d x) (a+i a \tan (c+d x))^m \, dx\) [326]

Optimal. Leaf size=144 \[ -\frac {2 (a+i a \tan (c+d x))^m}{d m (2+m)}+\frac {\, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}+\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (2+m)}-\frac {m (a+i a \tan (c+d x))^{1+m}}{a d \left (2+3 m+m^2\right )} \]

[Out]

-2*(a+I*a*tan(d*x+c))^m/d/m/(2+m)+1/2*hypergeom([1, m],[1+m],1/2+1/2*I*tan(d*x+c))*(a+I*a*tan(d*x+c))^m/d/m+ta
n(d*x+c)^2*(a+I*a*tan(d*x+c))^m/d/(2+m)-m*(a+I*a*tan(d*x+c))^(1+m)/a/d/(m^2+3*m+2)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3641, 3673, 3608, 3562, 70} \begin {gather*} \frac {(a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac {m (a+i a \tan (c+d x))^{m+1}}{a d \left (m^2+3 m+2\right )}+\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (m+2)}-\frac {2 (a+i a \tan (c+d x))^m}{d m (m+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^m,x]

[Out]

(-2*(a + I*a*Tan[c + d*x])^m)/(d*m*(2 + m)) + (Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*x])/2]*(a + I*a
*Tan[c + d*x])^m)/(2*d*m) + (Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^m)/(d*(2 + m)) - (m*(a + I*a*Tan[c + d*x])^
(1 + m))/(a*d*(2 + 3*m + m^2))

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 3562

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[-b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rule 3608

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*(
(a + b*Tan[e + f*x])^m/(f*m)), x] + Dist[(b*c + a*d)/b, Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[{a, b, c,
d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] &&  !LtQ[m, 0]

Rule 3641

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[d*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[1/(a*(m + n - 1)), Int[(a
 + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 2)*Simp[d*(b*c*m + a*d*(-1 + n)) - a*c^2*(m + n - 1) + d*(b*d*m
 - a*c*(m + 2*n - 2))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[
a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[n, 1] && NeQ[m + n - 1, 0] && (IntegerQ[n] || IntegersQ[2*m, 2*n])

Rule 3673

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B*d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e
 + f*x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b
*c - a*d, 0] &&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int \tan ^3(c+d x) (a+i a \tan (c+d x))^m \, dx &=\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (2+m)}-\frac {\int \tan (c+d x) (a+i a \tan (c+d x))^m (2 a+i a m \tan (c+d x)) \, dx}{a (2+m)}\\ &=\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (2+m)}-\frac {m (a+i a \tan (c+d x))^{1+m}}{a d \left (2+3 m+m^2\right )}-\frac {\int (a+i a \tan (c+d x))^m (-i a m+2 a \tan (c+d x)) \, dx}{a (2+m)}\\ &=-\frac {2 (a+i a \tan (c+d x))^m}{d m (2+m)}+\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (2+m)}-\frac {m (a+i a \tan (c+d x))^{1+m}}{a d \left (2+3 m+m^2\right )}+i \int (a+i a \tan (c+d x))^m \, dx\\ &=-\frac {2 (a+i a \tan (c+d x))^m}{d m (2+m)}+\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (2+m)}-\frac {m (a+i a \tan (c+d x))^{1+m}}{a d \left (2+3 m+m^2\right )}+\frac {a \text {Subst}\left (\int \frac {(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {2 (a+i a \tan (c+d x))^m}{d m (2+m)}+\frac {\, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}+\frac {\tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d (2+m)}-\frac {m (a+i a \tan (c+d x))^{1+m}}{a d \left (2+3 m+m^2\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 33.17, size = 0, normalized size = 0.00 \begin {gather*} \int \tan ^3(c+d x) (a+i a \tan (c+d x))^m \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^m,x]

[Out]

Integrate[Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^m, x]

________________________________________________________________________________________

Maple [F]
time = 1.09, size = 0, normalized size = 0.00 \[\int \left (\tan ^{3}\left (d x +c \right )\right ) \left (a +i a \tan \left (d x +c \right )\right )^{m}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^m,x)

[Out]

int(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^m,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^m,x, algorithm="maxima")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c)^3, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^m,x, algorithm="fricas")

[Out]

integral((2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^m*(I*e^(6*I*d*x + 6*I*c) - 3*I*e^(4*I*d*x + 4*I*c
) + 3*I*e^(2*I*d*x + 2*I*c) - I)/(e^(6*I*d*x + 6*I*c) + 3*e^(4*I*d*x + 4*I*c) + 3*e^(2*I*d*x + 2*I*c) + 1), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{m} \tan ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**3*(a+I*a*tan(d*x+c))**m,x)

[Out]

Integral((I*a*(tan(c + d*x) - I))**m*tan(c + d*x)**3, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^3*(a+I*a*tan(d*x+c))^m,x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c)^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^3\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^3*(a + a*tan(c + d*x)*1i)^m,x)

[Out]

int(tan(c + d*x)^3*(a + a*tan(c + d*x)*1i)^m, x)

________________________________________________________________________________________